package com.example.superoa.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the texaminee database table.
 * 
 */
@Entity
@NamedQuery(name="Texaminee.findAll", query="SELECT t FROM Texaminee t")
public class Texaminee implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int tmineeid;

	//bi-directional many-to-one association to Tarrange
	@OneToMany(mappedBy="texaminee")
	private List<Tarrange> tarranges;

	//bi-directional many-to-one association to Tasmission
	@OneToMany(mappedBy="texaminee")
	private List<Tasmission> tasmissions;

	//bi-directional many-to-many association to Trepeat
	@ManyToMany
	@JoinTable(
		name="bukao_kaosheng"
		, joinColumns={
			@JoinColumn(name="tmineeid")
			}
		, inverseJoinColumns={
			@JoinColumn(name="trepeatid")
			}
		)
	private List<Trepeat> trepeats;

	public Texaminee() {
	}

	public int getTmineeid() {
		return this.tmineeid;
	}

	public void setTmineeid(int tmineeid) {
		this.tmineeid = tmineeid;
	}

	public List<Tarrange> getTarranges() {
		return this.tarranges;
	}

	public void setTarranges(List<Tarrange> tarranges) {
		this.tarranges = tarranges;
	}

	public Tarrange addTarrange(Tarrange tarrange) {
		getTarranges().add(tarrange);
		tarrange.setTexaminee(this);

		return tarrange;
	}

	public Tarrange removeTarrange(Tarrange tarrange) {
		getTarranges().remove(tarrange);
		tarrange.setTexaminee(null);

		return tarrange;
	}

	public List<Tasmission> getTasmissions() {
		return this.tasmissions;
	}

	public void setTasmissions(List<Tasmission> tasmissions) {
		this.tasmissions = tasmissions;
	}

	public Tasmission addTasmission(Tasmission tasmission) {
		getTasmissions().add(tasmission);
		tasmission.setTexaminee(this);

		return tasmission;
	}

	public Tasmission removeTasmission(Tasmission tasmission) {
		getTasmissions().remove(tasmission);
		tasmission.setTexaminee(null);

		return tasmission;
	}

	public List<Trepeat> getTrepeats() {
		return this.trepeats;
	}

	public void setTrepeats(List<Trepeat> trepeats) {
		this.trepeats = trepeats;
	}

}